GXX=g++
CXXFLAGS = -O2 
EXEC=MNT_exe
SRC= $(wildcard *.cpp)
OBJ= $(SRC:.cpp=.o)

LDLIBS   = -lglut -lGL -lGLU -lm -lpng


.PHONY:	run	clean

all: $(EXEC)

$(EXEC):$(OBJ) 
	$(GXX) $(LDFLAGS) $(LDLIBS) -Wall -o $@ $^ glew.o

%.o: %.cpp
	$(GXX)    -o $@    -c $< 

lib:
	$(GXX)    -o glew.o -c glew.c -DGLEW_BUILD -I./ -DGLEW_STATIC

run:	$(EXEC)
	./$(EXEC)

clean: 
	rm *.o *~ *# *.ppm


cleanall:
	rm *.o *~ *# ./$(EXEC)